package hn.sigit.git.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.vividsolutions.jts.geom.MultiPolygon;

@Entity
@Table(name = "countries", schema = "spatialtest")
public class Countries {
	private int gid;
	private String countryName;
	private MultiPolygon theGeom;
	
	@Id
	@Column(name = "gid", unique = true, nullable = false)
	public int getGid() {
		return gid;
	}
	public void setGid(int gid) {
		this.gid = gid;
	}

	@Column(name = "cntry_name", nullable = false)
	public String getCountryName() {
		return countryName;
	}
	public void setCountryName(String countryName) {
		this.countryName = countryName;
	}

	@Column(name = "the_geom")
	@Type(type = "org.hibernatespatial.GeometryUserType")
	public MultiPolygon getTheGeom() {
		return theGeom;
	}
	public void setTheGeom(MultiPolygon theGeom) {
		this.theGeom = theGeom;
	}
}
